package com.zcsy.manage.web.main;


import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.zcsy.commons.constants.Constants;


/**
 * 界面跳转控制类，用于登陆前顶部菜单的跳转
 * @Title: JumpPageController.java
 * @Package： com.zcsy.manage.web.system 
 * @author hubing
 * @Copyright: 2016 武汉恒数利通软件有限公司 All rights reserved.
 * @date 2016年7月26日
 * @version 1.0
 * @see JDK1.7.0_75
 * @since
 */
@Controller
public class IndexController {

    @RequestMapping(value = "index", method = RequestMethod.GET)
    public String index(Model model, Integer item, HttpServletRequest request) {
        String pageUrl = "";
        switch (item) {
        case Constants.INDEX_ITEM_HOME:
            pageUrl = "login";
            break;
        case Constants.INDEX_ITEM_ABOUT_US:
            pageUrl = "index/index_about_us";
            break;
        case Constants.INDEX_ITEM_JOIN_US:
            pageUrl = "index/index_join_us";
            break;
        case Constants.INDEX_ITEM_ADVERTISE:
            pageUrl = "index/index_advertise";
            break;
        case Constants.INDEX_ITEM_APP:
            pageUrl = "index/index_app";
            break;
        default:
            break;
        }
        return pageUrl;
    }
}
